@extends('app')

@section('content')
    <form action="{{action('NewsController@update',$new->id)}}" method="post" role="form" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <div class="container">
            <div class="row">
                <div class="col-md-12 col-md-offset-0">
                    <div class="panel panel-primary">
                        <div class="panel-heading">新闻后台
                            <input  class="btn btn-primary col-md-offset-10 " type="submit" value="保存"   onclick="loading(this)">
                        </div>

                        <div class="panel-body">
                            <div class="form-group">
                                <div class="input-group ">
                                    <span class="input-group-addon" id="sizing-addon1" >标题</span>
                                    <input type="text" name="title" class="form-control"  aria-describedby="sizing-addon1" value={{$new->title}}>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-group ">
                                    <span class="input-group-addon" id="sizing-addon1">摘要</span>
                                <textarea class="form-control"    name="abstract" rows="8" >{{$new->abstract}}
                                </textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-group ">
                                <span class="input-group-addon" id="sizing-addon1">
                                    上传图片
                                </span>
                                    <input type="file" name="fileName" class="form-control">
                                </div>

                            </div>
                            <div class="form-group">
                                <div class="input-group ">
                                    <span class="input-group-addon" id="sizing-addon1">内容</span>
                                <textarea class="form-control"     name="body" rows="35" >{{$new->body}}
                                </textarea>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
@endsection
